package com.gupaoedu.concurrent.thread.example.processor;

import com.gupaoedu.concurrent.thread.example.FlightDetail;
import com.gupaoedu.concurrent.thread.example.Itinerary;
import com.gupaoedu.concurrent.thread.example.TrainDetail;

import java.util.List;

/**
 * 2019/5/12
 * created by chenpp
 */
public class FlightProcessor implements  Processor {
    @Override
    public List<Itinerary> handler(List<Itinerary> itineraries) {
        for(Itinerary itinerary:itineraries){
            FlightDetail detail = new FlightDetail();
            detail.setScheduleType(itinerary.getSchedultType());
            detail.setFlightNo("F1234");
            itinerary.setFlightDetail(detail);
        }
        return itineraries;
    }
}
